<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>管理员管理</h2>
        <ol class="breadcrumb">
            <li>
                <a href="#">首页</a>
            </li>

            <li class="active">
                <strong>管理员管理</strong>
            </li>
        </ol>
    </div>
</div>

<div class="wrapper wrapper-content animated fadeInRight ecommerce">
    <div class="ibox-content m-b-sm border-bottom" id="form1">
        <div class="row">
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="username">用户名</label>
                    <input type="text" id="username" name="username" placeholder="用户名"
                           class="form-control">
                </div>
            </div>

            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label">账户状态</label>
                    {:W('Parts/op',['name'=>'status','key'=>'ms'])}
                </div>
            </div>
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="real_name">真实姓名</label>
                    <input type="text" id="real_name" name="real_name" placeholder="真实姓名"
                           class="form-control">
                </div>
            </div>
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label">角色</label>
                    {:W('Parts/combo',['model'=>'role','name'=>'role_ids'])}
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <a class="btn btn-success btn-outline" href="#{:U('form')}">
                    <i class="fa fa-edit"></i>
                    <span class="bold">添加</span>
                </a>
            </div>
            <div class="col-sm-6 text-right">
                <button class="btn btn-default" data-op="reset">
                    <i class="fa fa-refresh"></i>
                    <span class="bold">重置</span>
                </button>
                &nbsp;
                &nbsp;
                <button class="btn btn-primary" data-op="search">
                    <i class="fa fa-search"></i>
                    <span class="bold">查询</span>
                </button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" id="footable">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function () {
        YFootTable.create('#footable', {
            baseUrl: "{:U('Admin/')}",
            searchForm: '#form1',
            columns: [
                {name: 'username', title: '用户名', sortable: true}
                , {name: 'ms__status', title: '状态', sortable: true}
                , {name: 'real_name', title: '真实姓名', sortable: true, breakpoints: 'xs ms'}
                , {name: 'role_names', title: '所属角色', sortable: false, breakpoints: 'xs ms'}
                , {name: 'create_time', title: '创建时间', sortable: true, breakpoints: 'xs ms lg'}
                , {name: 'creator', title: '创建人', sortable: true, breakpoints: 'xs ms lg'}
                , {name: 'modifier', title: '修改人', sortable: true, breakpoints: 'xs ms lg'}
                , {name: 'modify_time', title: '修改时间', sortable: true, breakpoints: 'xs ms lg'}
                , {name: 'last_login_ip', title: '最后登录IP', sortable: true, breakpoints: 'xs ms lg'}
                , {name: 'last_login_time', title: '最后登录时间', sortable: true, breakpoints: 'xs ms lg'}
            ],
            actions: ['view', 'edit', 'remove']
        });
    });
</script>